//
//  AboutCommaView.m
//  Comma
//
//  Created by dlios on 15-1-13.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "AboutCommaView.h"

@implementation AboutCommaView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
    
    }
    return self;
}
- (void)setUI
{
    self.scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, self.headerView.frame.size.height, SCREEN_WIDTH, SCREEN_HEIGHT - self.headerView.frame.size.height)];
    [_scroll setShowsVerticalScrollIndicator:NO];
    [_scroll setShowsHorizontalScrollIndicator:NO];
    [_scroll setBounces:NO];
    [self addSubview:_scroll];
    UIImageView * imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 1134)];
    if (iPhone6Plus) {
        [_scroll setContentSize:CGSizeMake(0, 1134)];
        imageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 1134);
        
    }
    if (iPhone6) {
        [_scroll setContentSize:CGSizeMake(0, 1027)];
        imageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 1027);
        
    } if (iPhone5) {
        [_scroll setContentSize:CGSizeMake(0, 876)];
        imageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 876);
    }
    imageView.image = [UIImage imageNamed:@"about-1"];
    [_scroll addSubview:imageView];
    
//
//    UIView * fir = [[UIView alloc] initWithFrame:CGRectMake(0, 414, SCREEN_WIDTH, 0.5)];
//    [fir setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:fir];
//    UILabel * isu = [[UILabel alloc] initWithFrame:CGRectMake(0, 370, SCREEN_WIDTH, 44)];
//    [isu setTextAlignment:NSTextAlignmentCenter];
//    [isu setFont:[UIFont systemFontOfSize:20.0f]];
//    [isu setTextColor:TEXTERGRAY];
//    [isu setText:@"www.isu.so"];
//    [_scroll addSubview:isu];
//    UILabel * our = [[UILabel alloc] initWithFrame:CGRectMake(0, 414, SCREEN_WIDTH, 44)];
//    [our setTextAlignment:NSTextAlignmentCenter];
//    [our setText:@"我们的理念"];
//    [our setTextColor:TEXTERGRAY];
//    [_scroll addSubview:our];
//    UILabel * zuo = [[UILabel alloc] initWithFrame:CGRectMake(0, 458, SCREEN_WIDTH, 56)];
//    [zuo setTextAlignment:NSTextAlignmentCenter];
//    [zuo setFont:[UIFont systemFontOfSize:12]];
//    [zuo setTextColor:TEXTERGRAY];
//    [zuo setNumberOfLines:3];
//    [zuo setText:@"做最适合大学生校园信息发布平台\n我们要把全世界的大学生连接在一起\n简单高效 实事求是"];
//    [_scroll addSubview:zuo];
//    UIView * sec = [[UIView alloc] initWithFrame:CGRectMake(0, 514, SCREEN_WIDTH, 0.5)];
//    [sec setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:sec];
//
//    UILabel * dou = [[UILabel alloc] initWithFrame:CGRectMake(0, 514, SCREEN_WIDTH, 44)];
//    [dou setTextAlignment:NSTextAlignmentCenter];
//    [dou setTextColor:TEXTERGRAY];
//    [dou setText:@"豆号的由来"];
//    [_scroll addSubview:dou];
//    UILabel * women = [[UILabel alloc] initWithFrame:CGRectMake(0, 558, SCREEN_WIDTH, 96)];
//    [women setTextAlignment:NSTextAlignmentCenter];
//    [women setTextColor:TEXTERGRAY];
//    [women setFont:[UIFont systemFontOfSize:10]];
//    [women setNumberOfLines:5];
//    [women setText:@"我们的Logo是一张逗号形状的纸，“逗号”和“纸”\n这两个大学生活中再常见不过的物像，象征着我们要做最贴近大学生的应用\n我们讨厌繁琐，甚至觉得“逗”字太复杂，\n于是就把它改成了“豆”，然后\n“豆号”诞生了！"];
//    [_scroll addSubview:women];
//    
//    UIView * thi = [[UIView alloc] initWithFrame:CGRectMake(0, 654, SCREEN_WIDTH, 0.5)];
//    [thi setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:thi];
//    
//    UILabel * yonghu = [[UILabel alloc] initWithFrame:CGRectMake(0, 654, SCREEN_WIDTH, 80)];
//    [yonghu setTextAlignment:NSTextAlignmentCenter];
//    [yonghu setNumberOfLines:2];
//    [yonghu setText:@"用户QQ群\n160982585"];
//    [yonghu setTextColor:TEXTERGRAY];
//    [_scroll addSubview:yonghu];
//    UIView * fou = [[UIView alloc] initWithFrame:CGRectMake(0, 734, SCREEN_WIDTH, 0.5)];
//    [fou setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:fou];
//    UILabel * bug = [[UILabel alloc] initWithFrame:CGRectMake(0, 734, SCREEN_WIDTH, 80)];
//    [bug setTextAlignment:NSTextAlignmentCenter];
//    [bug setText:@"BUG、学校信息错误、意见与建议等请发送至\nisu@isu.so"];
//    [bug setTextColor:TEXTERGRAY];
//    [bug setNumberOfLines:2];
//    [_scroll addSubview:bug];
//   
//    UIView * fiv = [[UIView alloc] initWithFrame:CGRectMake(0, 814, SCREEN_WIDTH, 0.5)];
//    [fiv setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:fiv];
//    UILabel * lianxi = [[UILabel alloc] initWithFrame:CGRectMake(0, 814, SCREEN_WIDTH, 40)];
//    [lianxi setTextAlignment:NSTextAlignmentCenter];
//    [lianxi setText:@"联系我们"];
//    [lianxi setTextColor:TEXTERGRAY];
//    [_scroll addSubview:lianxi];
//    UILabel * meiti = [[UILabel alloc] initWithFrame:CGRectMake(0, 854, SCREEN_WIDTH, 20)];
//    [meiti setFont:[UIFont systemFontOfSize:10]];
//    [meiti setTextAlignment:NSTextAlignmentCenter];
//    [meiti setTextColor:TEXTERGRAY];
//    [meiti setText:@"媒体咨询、商业投资、捐赠我们、加入我们"];
//    [_scroll addSubview:meiti];
//    UILabel * youxiang = [[UILabel alloc] initWithFrame:CGRectMake(0, 874, SCREEN_WIDTH, 40)];
//    [youxiang setTextColor:TEXTERGRAY];
//    [youxiang setTextAlignment:NSTextAlignmentCenter];
//    [youxiang setText:@"xy@isu.so"];
//    [_scroll addSubview:youxiang];
//    
//    UIView * six = [[UIView alloc] initWithFrame:CGRectMake(0, 914, SCREEN_WIDTH, 0.5)];
//    [six setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:six];
//    UILabel * guanzhu = [[UILabel alloc] initWithFrame:CGRectMake(0, 914, SCREEN_WIDTH, 40)];
//    [guanzhu setTextColor:TEXTERGRAY];
//    [guanzhu setTextAlignment:NSTextAlignmentCenter];
//    [guanzhu setText:@"关注我们"];
//    [_scroll addSubview:guanzhu];
//    
//    //微博
//    UIImageView * weibo = [[UIImageView alloc] initWithFrame:CGRectMake(115, 964, 76, 23)];
//    weibo.image = [UIImage imageNamed:@"weibo"];
//    [_scroll addSubview:weibo];
//    
//    UILabel *weiboName = [[UILabel alloc] initWithFrame:CGRectMake(221, 964, 100, 23)];
//    weiboName.textColor = TEXTERGRAY;
//    weiboName.text = @"豆号isuso";
//    [_scroll addSubview:weiboName];
//    
//    //微博button跳转微博页面
//    self.weiboButton = [UIButton buttonWithType:UIButtonTypeSystem];
////    self.weiboButton.backgroundColor = [UIColor blackColor];
//    self.weiboButton.frame = CGRectMake(weibo.frame.origin.x, weibo.frame.origin.y,weibo.frame.size.width + weibo.frame.size.width + 30, weibo.frame.size.height);
//    [_scroll addSubview:self.weiboButton];
//                             
//    //微信
//    UIImageView * weixin = [[UIImageView alloc] initWithFrame:CGRectMake(115, 997, 76, 23)];
//    weixin.image = [UIImage imageNamed:@"WeChat"];
//    [_scroll addSubview:weixin];
//    UILabel *weChat = [[UILabel alloc] initWithFrame:CGRectMake(221, 997, SCREEN_WIDTH - 221, 23)];
//    weChat.textColor = TEXTERGRAY;
//    weChat.text = @"douhaokeji";
//    [_scroll addSubview:weChat];
//    
//    //微信button跳转微博页面
//    self.weChatButton = [UIButton buttonWithType:UIButtonTypeSystem];
////    self.weChatButton.backgroundColor = [UIColor blackColor];
//    self.weChatButton.frame = CGRectMake(weixin.frame.origin.x, weixin.frame.origin.y,weixin.frame.size.width + weixin.frame.size.width + 30, weixin.frame.size.height);
//    [_scroll addSubview:self.weChatButton];
//
//    
//    UIView * sev = [[UIView alloc] initWithFrame:CGRectMake(0, 1034, SCREEN_WIDTH, 0.5)];
//    [sev setBackgroundColor:DIVIDINGLINECOLOR];
//    [_scroll addSubview:sev];
//    
//    UILabel *douhao = [[UILabel alloc] initWithFrame:CGRectMake(0, 1094, SCREEN_WIDTH, 30)];
//    douhao.text = @"豆号 2.0";
//    douhao.textColor = GREENCOLOR;
//    douhao.textAlignment = NSTextAlignmentCenter;
//    douhao.font = [UIFont boldSystemFontOfSize:17.0f];
//    [_scroll addSubview:douhao];
}
- (void)createWebViewWithUrl:(NSString *)urlStr
{
    NSURL *url = [NSURL URLWithString:urlStr];
    NSURLRequest *requset = [NSURLRequest requestWithURL:url];
    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, self.headerView.frame.size.height, SCREEN_WIDTH, SCREEN_HEIGHT - self.headerView.frame.size.height)];
    [webView loadRequest:requset];
    [self addSubview:webView];
}
@end
